package com.eephone.ep.views.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.eephone.ep.R;
import com.eephone.ep.views.view.CircleImageView;

import net.tsz.afinal.FinalActivity;
import net.tsz.afinal.FinalBitmap;
import net.tsz.afinal.FinalHttp;
import net.tsz.afinal.annotation.view.ViewInject;
import net.tsz.afinal.http.AjaxParams;

/**
 * Created by xyf on 2016/3/1.
 */
public class MainActivity extends AppCompatActivity {

    @ViewInject(id = R.id.layout_root)
    RelativeLayout mRootLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // 注入AFinal框架
        FinalActivity.initInjectedView(this);

        CircleImageView circleImageView = new CircleImageView(this);
        ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(100, 100);
        circleImageView.setLayoutParams(params);
        mRootLayout.addView(circleImageView);

        FinalBitmap.create(this).display(circleImageView, "http://www.arcoloring.com/img/icon_cits.jpg");


    }
}
